<?php

/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Badge
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 * @nulled     by TrioxX
 */

class Badge_Form_Admin_Global extends Engine_Form {
	public function init() {
		$this->setTitle ( 'Global Settings' )->setDescription ( 'These settings affect all members in your community.' );
		
		$this->addElement ( 'Text', 'badge_badgeperpage', array ('label' => 'Badges Per Page', 'description' => 'How many badges will be shown per page? (Enter a number between 1 and 100)', 'class' => 'short', 'value' => Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'badge.badgeperpage', 10 ), 'validators' => array ('Digits', new Zend_Validate_Between ( 1, 100 ) ) ) );
		
		$this->addElement ( 'Text', 'badge_notablemember', array ('label' => 'Notable Members', 'description' => 'Enter number of sample members to be shown for each badge on badge browse page. Enter 0 (zero) to disble this feature.', 'class' => 'short', 'value' => Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'badge.notablemember', 0 ), 'validators' => array ('Digits' ) ) );
		
		$this->addElement ( 'Text', 'badge_awardperpage', array ('label' => 'Awards Per Page', 'description' => 'How many awards will be shown per page? (Enter a number between 1 and 100)', 'class' => 'short', 'value' => Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'badge.awardperpage', 10 ), 'validators' => array ('Digits', new Zend_Validate_Between ( 1, 100 ) ) ) );
		
		$this->addElement ( 'Text', 'badge_memberperpage', array ('label' => 'Members Per Page', 'description' => 'How many members will be shown per page? (Enter a number between 1 and 100)', 'class' => 'short', 'value' => Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'badge.memberperpage', 10 ), 'validators' => array ('Digits', new Zend_Validate_Between ( 1, 100 ) ) ) );
		
		$this->addElement ( 'Text', 'badge_requestperpage', array ('label' => 'Requests Per Page', 'description' => 'How many requests will be shown per page? (Enter a number between 1 and 100)', 'class' => 'short', 'value' => Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'badge.requestperpage', 10 ), 'validators' => array ('Digits', new Zend_Validate_Between ( 1, 100 ) ) ) );
		
		// Add submit button
		$this->addElement ( 'Button', 'submit', array ('label' => 'Save Changes', 'type' => 'submit', 'ignore' => true ) );
	}
}